<template>
	<view class="content">
		<view class="title">
			{{title}}
		</view>
		<!-- <view class="tip">
			<view>{{Details.createBy}}</view>
			<view>{{Details.createTime | jiequ}}</view>
		</view> -->

		<view class="conten" style="display: flex;flex-direction: column;align-items: center;">
			{{content}}
			<image @tap="yulan(val)" v-for="val of files" :src="val" mode="" :key="val" style="margin: 10upx 0;width: 90%;"></image>
		</view>
		
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		data() {
			return {
				content: null,
				files: null,
				title:null
			}
		},
		computed: mapState(['URL', 'TOKEN', 'UPDATE']),
		onLoad() {
			uni.request({
				url: this.URL + 'skipdetail',
				success: res => {
					console.log(res.data.data[0]);
					let json = res.data.data[0];
					this.title = json.title;
					this.content = json.content;
					this.files = json.files.split(",");
				},
				fail: () => {},
				complete: () => {}
			});
		},
		methods: {
			yulan(e) {
				uni.previewImage({
					current: e,
					urls: this.files,
					success: () => {
					}
				})
			}
		},

	}
</script>

<style>
	.title {
		font-size: 50upx;
		text-align: center;
	}

	.tip {
		margin: 20upx 0;
		padding: 0 50upx;
		font-size: 30upx;
		color: #888888;
		display: flex;
		justify-content: space-between;
	}

	.conten {
		margin: 50upx 0;
		padding: 0 20upx;
	}

	uni-rich-text {
		text-indent: 2em;
	}
</style>
